Field of the Invention
Embodiments of the present invention relate generally to computer science and, more specifically, to migration counters for hybrid memories in a unified virtual memory system.
Description of the Related Art
Computing systems often include a hybrid memory system where one or more processing units access a first memory with a relatively large storage capacity and long access times and a second memory with a relatively small storage capacity and low access times. Software applications executing in the processing units may allocate memory in such a fashion as to store larger data structures in the first memory, as well as data that is accessed relatively rarely. Likewise, software applications may allocate memory as to store smaller data structures in the second memory, as well as data that is accessed relatively frequently.
One drawback with this approach is that a software application, operating system, and driver software may not know, a priori, which data structures are relatively large or small, or the frequency at which various data are accessed. In addition, a particular data structure may include memory pages that are accessed relatively rarely along with memory pages that are accessed relatively frequently. Finally, the frequency at which a given memory page is accessed may increase or decrease over time, such that a memory page initially well-suited for allocation in the larger, slower memory may later be better suited for allocation in the smaller, faster memory, and vice versa. As such, some memory pages accessed with relative frequency may, nevertheless, be allocated to the larger, slower memory, while other pages accessed relatively rarely may be allocated to the smaller, faster memory.
Accordingly, what is needed in the art is a more effective way to allocate memory pages in a hybrid memory system.